# Contributor: Roman Kyrylych <roman@archlinux.org>

pkgname=gnome-user-share
pkgver=43.0
pkgrel=1
pkgdesc="Easy to use user-level file sharing for GNOME"
url="https://gitlab.gnome.org/GNOME/gnome-user-share"
arch=(x86_64)
license=(GPL)
depends=(glib2 dconf mod_dnssd systemd)
makedepends=(git meson)
groups=(gnome)
_commit=a0e790aa9494db9d1b1f48b4fc0d2f78e112044d  # tags/43.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-user-share.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  local meson_options=(
    -D httpd=/usr/bin/httpd
    -D modules_path=/usr/lib/httpd/modules
  )

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
